package com.abaaba.project2.controller;

import com.abaaba.project2.bean.bo.AdminSearchHistoryBaseReq;
import com.abaaba.project2.bean.vo.AdminSearchHistoryVo;
import com.abaaba.project2.bean.vo.BaseRespVo;
import com.abaaba.project2.service.AdminHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 公网前端无返回数据， 暂无法完成
 * */
@RestController
@RequestMapping("/admin/history")
public class AdminSearchHistoryController {
    @Autowired
    AdminHistoryService adminHistoryService;

    @RequestMapping("/list")
    public BaseRespVo getHistoryList(AdminSearchHistoryBaseReq baseReq) {
        AdminSearchHistoryVo adminSearchHistoryVo = adminHistoryService.getHistoryList(baseReq.getPage(),
                baseReq.getLimit(),baseReq.getUserId(),baseReq.getKeyword(),baseReq.getSort(),
                baseReq.getOrder());

        return BaseRespVo.ok(adminSearchHistoryVo);
    }
}
